package com.oj.core.proxy;

import com.oj.api.core.CoreApi;
import com.oj.api.core.domain.JudgeInfo;
import com.oj.api.core.domain.ProblemInfo;
import com.oj.api.core.domain.ProblemSetCategoryInfo;
import com.oj.api.core.domain.ProblemSetInfo;
import com.oj.api.core.service.IJudgeService;
import com.oj.api.core.service.IProblemSetCategoryService;
import com.oj.common.IProxyLayer;
import com.oj.common.InfoPage;
import com.oj.common.exception.BreezeeException;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by Bing on 2018/5/4.
 */
@RestController
@RequestMapping("/"+ CoreApi.BEAN_JUDGE_SERVICE)
public class JudgeServiceProxy implements IJudgeService,IProxyLayer{

    @Resource(name = CoreApi.BEAN_JUDGE_SERVICE)
    private IJudgeService target;

    @Override
    public JudgeInfo saveInfo(JudgeInfo judgeInfo) throws BreezeeException {
        return null;
    }

    @Override
    public JudgeInfo findInfoById(@PathVariable("id") String id) throws BreezeeException {
        return target.findInfoById(id);
    }

    @Override
    public JudgeInfo judge(@RequestBody JudgeInfo judgeInfo) {
        return target.judge(judgeInfo);
    }

    @Override
    public List<JudgeInfo> listInfos(@RequestBody JudgeInfo judgeInfo) {
        return target.listInfos(judgeInfo);
    }

    @Override
    public InfoPage<JudgeInfo> pageInfos(@RequestBody JudgeInfo judgeInfo) {
        return target.pageInfos(judgeInfo);
    }

    @Override
    public void deleteInfo(String id) throws BreezeeException {

    }

    @Override
    public InfoPage findRankOfProblemSet(@RequestBody JudgeInfo judgeInfo) {
        return target.findRankOfProblemSet(judgeInfo);
    }
}
